-- GENERATED SPELL FOR [Saturated Ooze] --


function spell0_5228(pUnit, Event) --@Summon Oozeling,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(12018,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_5228', 1, 1)
end

function spell1_5228(pUnit, Event) --@Summon Oozeling,Self--
pUnit:FullCastSpellOnTarget(12250,pUnit)
pUnit:RegisterEvent('Sorts_5228', 563, 1)
end

function Sorts_5228(pUnit, Event)
local choix_sorts_5228 = math.random(0, 1)
if choix_sorts_5228 == 0 then
pUnit:RegisterEvent('spell0_5228', 1, 1)
end
if choix_sorts_5228 == 1 then
pUnit:RegisterEvent('spell1_5228', 1, 1)
end
end

function mob5228_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5228', math.random(1500, 3000), 1)
end

function mob5228_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5228_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5228_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5228, 1, 'mob5228_Action')
RegisterUnitEvent(5228, 2, 'mob5228_Leave')
RegisterUnitEvent(5228, 3, 'mob5228_Kill')
RegisterUnitEvent(5228, 4, 'mob5228_Die')
